using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class T_BASE_ICItemEntranceMap : EntityTypeConfiguration<T_BASE_ICItemEntrance>
    {
        public T_BASE_ICItemEntranceMap()
        {
            // Primary Key
            this.HasKey(t => t.FItemID);

            // Properties
            this.Property(t => t.FItemID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FNameEn)
                .HasMaxLength(255);

            this.Property(t => t.FModelEn)
                .HasMaxLength(255);

            this.Property(t => t.FFirstUnit)
                .HasMaxLength(255);

            this.Property(t => t.FSecondUnit)
                .HasMaxLength(255);

            // Table & Column Mappings
            this.ToTable("T_BASE_ICItemEntrance");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FNameEn).HasColumnName("FNameEn");
            this.Property(t => t.FModelEn).HasColumnName("FModelEn");
            this.Property(t => t.FHSNumber).HasColumnName("FHSNumber");
            this.Property(t => t.FFirstUnit).HasColumnName("FFirstUnit");
            this.Property(t => t.FSecondUnit).HasColumnName("FSecondUnit");
            this.Property(t => t.FFirstUnitRate).HasColumnName("FFirstUnitRate");
            this.Property(t => t.FSecondUnitRate).HasColumnName("FSecondUnitRate");
            this.Property(t => t.FIsManage).HasColumnName("FIsManage");
            this.Property(t => t.FPackType).HasColumnName("FPackType");
            this.Property(t => t.FLenDecimal).HasColumnName("FLenDecimal");
            this.Property(t => t.FCubageDecimal).HasColumnName("FCubageDecimal");
            this.Property(t => t.FWeightDecimal).HasColumnName("FWeightDecimal");
            this.Property(t => t.FImpostTaxRate).HasColumnName("FImpostTaxRate");
            this.Property(t => t.FConsumeTaxRate).HasColumnName("FConsumeTaxRate");
            this.Property(t => t.FManageType).HasColumnName("FManageType");
        }
    }
}
